package com.zbkj.common.request.order;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @Auther:
 * @Date: 2024/9/15 19:59
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "OrderDetailSaveRequest对象", description = "订单明细保存请求对象")
public class OrderDetailSaveRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品id")
    @NotNull(message = "商品ID不能为空")
    private Long productId;

    @ApiModelProperty("购买数量")
    @NotNull(message = "购买数量不能为空")
    @Range(min=1, message = "购买数量最小为1")
    private Long productNum;
}
